package com.qianxun.module.datasource1.admin.rest;


import com.qianxun.module.datasource1.admin.service.SysDataModifyLockService;
import com.qianxun.module.datasource1.admin.dto.SysDataModifyLockDTO;
import com.qianxun.module.base.constant.Result;
import com.qianxun.module.base.bo.ValidGroup;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;
import org.springframework.validation.annotation.Validated;

import javax.annotation.Resource;

/**
* com.zch.admin.base.entity.SysDataModifyLock模型http接口处理
*
* @author: admin
* @date: 2019-12-02
* @version: 1.0.0
*/
@Validated(value = {ValidGroup.All.class})
@RestController
@RequestMapping(value="/admin/dataModifyLock" ,produces = {MediaType.APPLICATION_JSON_UTF8_VALUE})
public class SysDataModifyLockRestController {

    @Resource
    private SysDataModifyLockService baseService;

    @PostMapping(value = {"/add"})
    public Result add(SysDataModifyLockDTO query) {
        baseService.add(query);
        return Result.success();
    }

    @PostMapping(value = {"/delete"})
    public Result deleteById(SysDataModifyLockDTO query) {
        baseService.removeByKey(query);
        return Result.success();
    }

}
